//
//  LSYmemViewController.m
//  contact
//
//  Created by lsy on 15/11/21.
//  Copyright © 2015年 刘世玉. All rights reserved.
//

#import "LSYmemViewController.h"
#import <Masonry.h>
@interface LSYmemViewController ()

@end

@implementation LSYmemViewController

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.name = [[UILabel alloc] init];
        self.name.backgroundColor = [UIColor cyanColor];
        
        self.sex = [[UILabel alloc] init];
        self.sex.backgroundColor = [UIColor cyanColor];
        
        self.number = [[UILabel alloc] init];
        self.number.backgroundColor = [UIColor cyanColor];
        
        self.phoneNum = [[UILabel alloc] init];
        self.phoneNum.backgroundColor = [UIColor cyanColor];
        
        
        self.qq = [[UILabel alloc] init];
        self.qq.backgroundColor = [UIColor cyanColor];
        
        self.birthPlace = [[UILabel alloc] init];
        self.birthPlace.backgroundColor = [UIColor cyanColor];
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(goUpdate)];
    
    
    
    
    
    
    [self.view addSubview:self.name];
    [self.view addSubview:self.number];
    [self.view addSubview:self.sex];
    [self.view addSubview:self.phoneNum];
    [self.view addSubview:self.qq];
    [self.view addSubview:self.birthPlace];
    
    [self.name mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.mas_equalTo(100);
        make.right.mas_equalTo(-150);
        make.left.mas_equalTo(30);
        make.height.mas_equalTo(40);
    }];
    
    [self.sex mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.name);
        make.right.mas_equalTo(-60);
        make.left.equalTo(self.name.mas_right).with.offset(20);
        make.height.equalTo(self.name);
    }];
    
    [self.number mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.name.mas_bottom).with.offset(20);
        make.right.mas_equalTo(-60);
        make.left.mas_equalTo(30);
        make.height.equalTo(self.name);
    }];
    
    [self.phoneNum mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.number.mas_bottom).with.offset(20);
        make.right.mas_equalTo(-60);
        make.left.mas_equalTo(30);
        make.height.equalTo(self.name);
        
    }];
    
    [self.qq mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.phoneNum.mas_bottom).with.offset(20);
        make.right.mas_equalTo(-60);
        make.left.mas_equalTo(30);
        make.height.equalTo(self.name);
        
    }];
    
    [self.birthPlace mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.qq.mas_bottom).with.offset(20);
        make.right.mas_equalTo(-60);
        make.left.mas_equalTo(30);
        make.height.equalTo(self.name);
    }];
    
    
    //    self
    
    // Do any additional setup after loading the view.
}

- (void)goUpdate
{
   
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
